﻿using System;
using UnityEngine;
using Verse;

namespace RimZombieGirl
{
	[StaticConstructorOnStartup]
	public class Gizmo_StartTransform : Command
	{
		public Gizmo_StartTransform(Building_TransformationCoffin chamber)
		{
			this.transCoffin = chamber;
			if (this.transCoffin.IsPawnZombie()/*&&this.transCoffin.CanLevelUp()*/)
			{
				this.defaultLabel = Translator.Translate(this.labelInitLevelUp);
				this.defaultDesc = Translator.Translate(this.descriptionInitLevelUp);
			}
			else
			{
				this.defaultLabel = Translator.Translate(this.labelInitTransform);
				this.defaultDesc = Translator.Translate(this.descriptionInitTransform);
			}
			this.icon = Gizmo_StartTransform.initIcon;
		}

		public override void ProcessInput(Event ev)
		{
			base.ProcessInput(ev);


            if (transCoffin != null)
			{
				this.transCoffin.InitiatePawnTransform();
			}
			else
			{
				Log.Message("null building_TransformationCoffin in Gizmo_StartTransform.ProcessInput");
			}
				
        }

		public Building_TransformationCoffin transCoffin;

        public static Texture2D initIcon = ContentFinder<Texture2D>.Get("UI/Gizmos/RI_Icon_ResurrectNecrosapiens", true);

        public string labelInitLevelUp = "ZombieGizmoInitLevelUpLabel";

		public string labelInitTransform = "ZombieGizmoInitTransformLabel";

		public string descriptionInitLevelUp = "ZombieGizmoInitLevelUpDescription";

		public string descriptionInitTransform = "ZombieGizmoInitTransformDescription";
	}
}
